package demo1218.pm;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/*
员工类:姓名 年龄  薪资(先比较薪资(从高到低)排序,薪资相同比较年龄);

 */
public class Demo_05 {
    public static void main(String[] args) {
        List<Employee> list = new ArrayList<>();
        list.add(new Employee("张帅",2000.0,22));
        list.add(new Employee("大聪明",2000.0,23));
        list.add(new Employee("董文祥",3000.0,22));
        list.add(new Employee("陈伟群",30000.0,22));
        Collections.sort(list);
        System.out.println(list);
    }
}
